package com.yan.supermangesystem.controller;

import com.yan.supermangesystem.service.SuperService;
import com.yan.supermangesystem.service.SuperServicelmpl;

import java.util.Scanner;

public class SuperIndex {

    public static final Scanner INPUT = new Scanner(System.in);
    public static final SuperServicelmpl SPU = new SuperServicelmpl();

    public static void main(String[] args) {
        SPU.inital();
       outer:
       while (true) {
            System.out.println("===============================欢迎使用超市用户管理系统===========================================");
            System.out.println("1.查询会员信息");
            System.out.println("2.删除会员");
            System.out.println("3.新增会员");
            System.out.println("4.退出");
            System.out.println("================================================================================================");
            int choice = INPUT.nextInt();
            switch (choice) {
                case 1:
                    SPU.searchAll();
                    break;
                case 2:
                    SPU.deleteUserInfo();
                    break;
                case 3:
                    SPU.addUserInfo();
                    break;
                case 4:
                    System.err.println("系统退出");
                    break outer;
            }
        }
    }
}
